<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
		<ui:composition>
			<t:panelGrid columns="2">
				<t:outputText value="Creator"/>
				<t:outputText value="#{manageTestPlansBean.singleTestPlan.creator.name}"/>
				<t:outputText value="Modifier"/>
				<t:outputText value="#{manageTestPlansBean.singleTestPlan.modifier.name}"/>
				<t:outputText value="Creation date"/>
				<t:outputText value="#{manageTestPlansBean.singleTestPlan.creationDate}">
					<f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" timeZone= "#{manageTestCasesBean.timeZone}"/>
				</t:outputText>
				<t:outputText value="Modification date"/>
				<t:outputText value="#{manageTestPlansBean.singleTestPlan.modificationDate}">
					<f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" timeZone= "#{manageTestCasesBean.timeZone}"/>
				</t:outputText>
				<t:outputText value="Id"/> 
				<t:outputText value="#{manageTestPlansBean.singleTestPlan.id}"/>	
				<t:outputText value="Plan Summary"/>
				<t:panelGroup>
					<t:inputText  id="summary" label="summary" value="#{manageTestPlansBean.singleTestPlan.summary}" required="true">
					<f:validateLength minimum="2" maximum="25" />
				</t:inputText>
				<t:message for="summary" errorStyle="color:red; text-decoration:overline"  />
				</t:panelGroup>
				<t:outputText value="Test cycle"/>
				<t:panelGroup>
					<t:inputText id="test_cycle" label="test_cycle" value="#{manageTestPlansBean.singleTestPlan.testCycle}">
						<f:validateLength minimum="2" maximum="25" />
					</t:inputText>
					<t:message for="test_cycle" errorStyle="color:red; text-decoration:overline" />
					
				</t:panelGroup>
				<t:outputText value="Planed execution time"/>
				<t:panelGroup>
					<t:inputText id="planned_time" label="planned_time" value="#{manageTestPlansBean.singleTestPlan.plannedExecutionTime}">
						<f:validateDoubleRange minimum="0"  />
					</t:inputText>
					<t:message for="planned_time" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText value="Start date/dd-MM-yyyy"/>
				<t:panelGroup>
					<t:inputText id="start_date" label="start_date" value="#{manageTestPlansBean.startDate}">
						<f:convertDateTime pattern="dd-MM-yyyy" timeZone= "#{manageTestCasesBean.timeZone}"/>
					</t:inputText>
					<t:message for="start_date" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText value="End Date/dd-MM-yyyy"/>
				<t:panelGroup>
					<t:inputText id="end_date" label="end_date" value="#{manageTestPlansBean.endDate}">
						<f:convertDateTime pattern="dd-MM-yyyy" timeZone= "#{manageTestCasesBean.timeZone}"/>
					</t:inputText>
					<t:message for="end_date" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText value="Product" />
				<t:selectOneMenu 
						value="#{manageTestPlansBean.singleTestPlan.product}" 
						converter="#{manageUsersBean.productConverter}" >
					<f:selectItems value="#{manageTestPlansBean.productList}" />	
				</t:selectOneMenu>
				<t:outputText value="Test cases" />
				<t:selectManyListbox   size="6"  value="#{manageTestPlansBean.searchWordTestCase}">
					<f:selectItems value="#{manageTestPlansBean.caseList}" />	
				</t:selectManyListbox>
		  	 	<t:commandButton action="#{manageTestPlansBean.editTestPlan}" value="save" />
		   		<t:commandButton action="plansList" value="cancel" />	 	
	   		</t:panelGrid>	
	   </ui:composition>
   </body>
 </html>